home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / pc / windows / qtw_201 / setup / samples / mmio_dh / libmain.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-19  |  1.2 KB  |  61 lines

  1. //
  2. // Description:  DLL initialization
  3. //
  4. // ---------------------------------------------------------------------
  5. // Windows header files
  6.  
  7. #include <windows.h>
  8. #include <windowsx.h>
  9.  
  10. // Compiler header files
  11. #include <string.h>
  12.  
  13. // Application header files
  14. #include "datahp.h"
  15.  
  16. // Local data
  17. static HINSTANCE hInstThisMod ;
  18.  
  19. // EJECT PAGE 
  20. /*
  21. ********************************************************************************
  22. **
  23. ** Name: LibMain()
  24. **
  25. ** Description:
  26. **
  27. **  DLL Initialization.
  28. **
  29. */
  30. int FAR PASCAL LibMain( HINSTANCE hInstance
  31.                       , WORD wDataSeg
  32.                       , WORD wHeapSize
  33.                       , LPSTR lpszCmdLine
  34.                       )
  35. {
  36.   // perform common initialization
  37.   if ( wHeapSize > 0)
  38.     UnlockData( 0) ;
  39.   hInstThisMod = hInstance ;                // save instance handle
  40.  
  41.   // successful return
  42.   return 1 ;
  43. }
  44.  
  45. // EJECT PAGE 
  46. /*
  47. ********************************************************************************
  48. **
  49. ** Name: GetInstOfThisMod()
  50. **
  51. ** Description:
  52. **
  53. **  Returns HINSTANCE of this DLL.
  54. **
  55. ********************************************************************************
  56. */
  57. HINSTANCE FAR GetInstOfThisMod()
  58. {
  59.   return hInstThisMod ;
  60. }
  61.